package org.easy.tool.controller;

import org.easy.tool.common.R;
import org.easy.tool.service.IProblemMark;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Valley
 * @since 2024-09-04 22:51:14
 */
@RestController
@RequestMapping("/problemMark")
@CrossOrigin
public class ProblemMarkController {

    @Autowired
    IProblemMark problemMarkService;


    @RequestMapping("getProblemMarkList")
    public R getProblemMarkList(@RequestBody(required = false) LinkedHashMap data) throws Exception {
        return R.ok(problemMarkService.getProblemMarkList(data));
    }

    @RequestMapping("editProblemMark")
    public R editProblemMark(@RequestBody(required = false) LinkedHashMap data) throws Exception {
        return R.ok(problemMarkService.editProblemMark(data));
    }

    @RequestMapping("getProblemList")
    public R getProblemList(@RequestBody(required = false) LinkedHashMap data) throws Exception {
        return R.ok(problemMarkService.getProblemList(data));
    }

}
